package org.mindrive.system.collection.system;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.BlobTypeHandler;

import java.util.Date;

/**
 * (File)表实体类
 *
 * @author maweihong
 * @since 2023-10-11 17:16:02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("FILE")
@ApiModel(value = "文件管理", description = "")
public class FileEntity {

    //PK
    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    private String id;

    //code
    @TableField("ENCODING")
    private String encoding;

    //文件名称
    @TableField("FILE_NAME")
    private String fileName;

    //文件类型
    @TableField("TYPE")
    private String type;

    //文件大小
    @TableField("FILE_SIZE")
    private Double fileSize;

    //下载链接
    @TableField("DOWNLOAD_URL")
    private String download_url;

    //文件md5
    @TableField("FILE_MD5")
    private String fileMD5;

    //链接是否可用（1：是 0：否）
//    @TableField("lian_jie_shi_fou_ke_yong")
//    private Integer lianJieShiFouKeYong;

    //是否删除（1：是 0：否）
    @TableField("DELETE_TYPE")
    private String deleteType;

    //用户输入的文件名称
    @TableField("USER_FILE_NAME")
    private String userFileName;

    //前端传的下载的条件
    @TableField("FILE_UUID")
    private String fileUuid;

    @TableField(value = "FILE_CONTENT" , typeHandler = BlobTypeHandler.class)
    private byte[] fileContent;

    @TableField("CREATOR")
    private String creator;

    @TableField("CREATED_AT")
    private Date createdAt;

    @TableField("UPDATOR")
    private String updator;

    @TableField("UPDATED_AT")
    private Date updatedAt;
}
